<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>付款申请管理</title>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
	<meta name="decorator" content="ani"/>
	<%@ include file="/webpage/include/bootstraptable.jsp"%>
	<%@include file="/webpage/include/treeview.jsp" %>
	<%@include file="paymentApplicationList.js" %>
</head>
<body>
	<div class="wrapper wrapper-content">
	<div class="panel panel-primary">
	<div class="panel-heading">
		<h3 class="panel-title">付款申请列表</h3>
	</div>
	<div class="panel-body">
		<sys:message content="${message}"/>
	
	<!-- 搜索 -->
	<div class="accordion-group">
	<div id="collapseTwo" class="accordion-body collapse">
		<div class="accordion-inner">
			<form:form id="searchForm" modelAttribute="paymentApplication" class="form form-horizontal well clearfix">
				<div class="col-xs-6 col-sm-3 col-md-2">
				<label class="label-item single-overflow pull-left" title="单据号：">单据号：</label>
				<form:input path="code" htmlEscape="false" maxlength="64"  class=" form-control"/>
			</div>
				<div class="col-xs-6 col-sm-3 col-md-2">
					<label class="label-item single-overflow pull-left" title="单据号：">采购单据号：</label>
					<form:input path="cgdh" htmlEscape="false" maxlength="64"  class=" form-control"/>
				</div>
				<div class="col-xs-6 col-sm-3 col-md-2">
					<label class="label-item single-overflow pull-left" title="单据号：">付款单位：</label>
					<form:input path="fkdw" htmlEscape="false" maxlength="64"  class=" form-control"/>
				</div>
				<div class="col-xs-6 col-sm-3 col-md-2">
					<label class="label-item single-overflow pull-left" title="单据号：">费用归属：</label>
					<form:select path="fygs" class="form-control required">
						<form:option value="">请选择</form:option>
						<form:options items="${fns:getDictList('guishu')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
					</form:select>
				</div>
				<div class="col-xs-6 col-sm-3 col-md-2">
					<label class="label-item single-overflow pull-left" title="单据状态：">单据状态：</label>
					<select name="status"  class=" form-control">
						<option value="">请选择</option>
						<option value="已创建">已创建</option>
						<option value="已确认待审批">已确认待审批</option>
						<option value="经理已审批">经理已审批</option>
						<option value="总监已审批">总监已审批</option>
						<option value="总经理已审批">总经理已审批</option>
						<option value="审核未通过">审核未通过</option>
					</select>
				</div>
				<div class="col-xs-6 col-sm-3 col-md-2">
					<div class="form-group">
						<label class="label-item single-overflow pull-left" title="截止时间">申请时间:</label>
						<div class="col-xs-12">
							<div class='input-group date' id='date' >
								<input type='text'  name="date" class="form-control"  />
								<span class="input-group-addon">
			                       <span class="glyphicon glyphicon-calendar"></span>
			                   </span>
							</div>
						</div>
					</div>
				</div>
				<div class="col-xs-6 col-sm-3 col-md-2">
					<div class="form-group">
						<label class="label-item single-overflow pull-left" title="截止时间">付款时间:</label>
						<div class="col-xs-12">
							<div class='input-group date' id='fkdate' >
								<input type='text'  name="fkrq" class="form-control"  />
								<span class="input-group-addon">
			                       <span class="glyphicon glyphicon-calendar"></span>
			                   </span>
							</div>
						</div>
					</div>
				</div>
				<shiro:hasPermission name="ap:expenditure:pro">
					<div class="col-xs-6 col-sm-3 col-md-2">
						<label class="label-item single-overflow pull-left" title="：">项目：</label>
						<select name="pro" class=" form-control">
							<option value="">请选择</option>
							<option value="武汉润滑油仓储项目">武汉润滑油仓储项目</option>
							<option value="北京润滑油运输项目">北京润滑油运输项目</option>
							<option value="天津润滑油运输项目">天津润滑油运输项目</option>
							<option value="西安润滑油仓储配送项目">西安润滑油仓储配送项目</option>
							<option value="郑州润滑油运输项目">郑州润滑油运输项目</option>
							<option value="重庆润滑油仓储配送项目">重庆润滑油仓储配送项目	</option>

							<option value="石家庄润滑油仓储配送项目">石家庄润滑油仓储配送项目</option>
						</select>
					</div></shiro:hasPermission>
				<div class="col-xs-6 col-sm-3 col-md-2">
			<div style="margin-top:26px">
			  <a  id="search" class="btn btn-primary btn-rounded  btn-bordered btn-sm"><i class="fa fa-search"></i> 查询</a>
			  <a  id="reset" class="btn btn-primary btn-rounded  btn-bordered btn-sm" ><i class="fa fa-refresh"></i> 重置</a>
			 </div>
	    </div>	
	</form:form>
	</div>
	</div>
	</div>
	
	<!-- 工具栏 -->
	<div id="toolbar">
			<shiro:hasPermission name="ap:paymentApplication:add">
				<a id="add" class="btn btn-primary" onclick="add()"><i class="glyphicon glyphicon-plus"></i> 新建</a>
			</shiro:hasPermission>
			<shiro:hasPermission name="ap:paymentApplication:edit">
			    <button id="edit" class="btn btn-success" disabled onclick="edit()">
	            付款填写/修改
	        	</button>
			</shiro:hasPermission>
		<shiro:hasPermission name="ap:paymentApplication:qr">
		<button id="qr" class="btn btn-primary" disabled onclick="qr()">
			确认提交
		</button>
		</shiro:hasPermission>
		<shiro:hasPermission name="ap:paymentApplication:bh">
		<button id="bh" class="btn btn-danger" disabled onclick="bh('${fns:getUserPosition()}')">
			<i class="glyphicon glyphicon-remove"></i> 驳回
		</button>
		</shiro:hasPermission>
		<shiro:hasPermission name="ap:paymentApplication:sp">
			<input type="button" id="sp"  class="btn btn-success"  onclick="sp('${fns:getUserPosition()}')" value="审批"/>
		</shiro:hasPermission>
		<shiro:hasPermission name="ap:paymentApplication:dy">
		<button id="dy" class="btn btn-primary" disabled onclick="fksqdy()">
			<i class="glyphicon glyphicon-remove"></i> 打印
		</button>
		</shiro:hasPermission>
		<shiro:hasPermission name="ap:paymentApplication:qr">
			<button id="fkqr" class="btn btn-primary" disabled onclick="fkqr()">
				付款确认
			</button>
		</shiro:hasPermission>
			<shiro:hasPermission name="ap:paymentApplication:del">
				<button id="remove" class="btn btn-danger" disabled onclick="deleteAll()">
	            	<i class="glyphicon glyphicon-remove"></i> 删除
	        	</button>
			</shiro:hasPermission>
			<shiro:hasPermission name="ap:paymentApplication:import">
				<button id="btnImport" class="btn btn-info"><i class="fa fa-folder-open-o"></i> 导入</button>
				<div id="importBox" class="hide">
						<form id="importForm" action="${ctx}/ap/paymentApplication/import" method="post" enctype="multipart/form-data"
							 style="padding-left:20px;text-align:center;" ><br/>
							<input id="uploadFile" name="file" type="file" style="width:330px"/>导入文件不能超过5M，仅允许导入“xls”或“xlsx”格式文件！<br/>　　
							
							
						</form>
				</div>
			</shiro:hasPermission>
	        	<a class="accordion-toggle btn btn-default" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
					<i class="fa fa-search"></i> 检索
				</a>
		    </div>
		
	<!-- 表格 -->
	<table id="paymentApplicationTable" class="table text-nowrap"  data-toolbar="#toolbar"></table>

    <!-- context menu -->

	</div>
	</div>
	</div>
	<div class="modal fade" id="tb" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title">审批意见</h4>
				</div>
				<div class="modal-body">
					<table class="table table-bordered">
						<tr>
							<td><textarea id="spyj" rows="4" class="form-control "></textarea></td>
						</tr>
					</table>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
					<button type="button" class="btn btn-primary" onclick="spqd()">确定</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal -->
	</div>
	<div class="modal fade" id="tb1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title">驳回意见</h4>
				</div>
				<div class="modal-body">
					<table class="table table-bordered">
						<tr>
							<td><textarea id="bhyj" rows="4" class="form-control "></textarea></td>
						</tr>
					</table>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
					<button type="button" class="btn btn-primary" onclick="bhqd()">确定</button>
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal -->
	</div>

</body>
</html>